
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<html>
<head>
    <title>Title</title>
    <script>
        var info = "<%=request.getParameter("info")%>";
        var name = "<%=request.getParameter("name")%>";
        switch (info) {
            case "regsuccess":
                var truthBeTold = window.confirm("注册成功！是否返回登陆页面？");
                if (truthBeTold) {
                    location.href = "index.jsp";
                } else
                    window.alert("再见啦！");
                break;
            case "student":
                alert("欢迎同学！" + name);
                location.href = "/student/student.jsp";
                break;
            case "teacher":
                alert(name + ", 老师您好！");
                location.href = "/teacher/teacher.jsp";
                break;
            case "admin":
                alert(name + ", 管理员您好！");
                location.href = "/admin/admin.jsp";
                break;
            case "setnew":
                alert("修改密码成功,请返回登陆页面!");
                location.href = "index.jsp";
        }
    </script>
</head>
<body>
</body>
</html>
